// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import "babel-polyfill";
import Vue from 'vue'
import App from './App'
import router from './router'
import Vuex from 'vuex'
import '@/assets/css/main.css'
import '@/assets/font/iconfont.css'
import '@/assets/js/flexible.js'

Vue.config.productionTip = false

Vue.use(Vuex);

const store = new Vuex.Store({
  state: {
    menuIndex: 0
  },
  mutations: {
    //state必须传
     changeIndex(state, i) {
        state.menuIndex=i;
    }
  }
})
/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  store,
  components: { App },
  template: '<App/>'
})
